package com.zsh.myserver.model;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.util.List;

/**
 * Copyright ©2017-2020 Machinsight Technology Co., Ltd.All rights reserved.
 * Author: Zhoushaohua
 * Date: 2020/4/16
 * Description:
 */
@Entity//打上该注解，表明映射到数据库中的一张表
@Getter
@Setter
@Table
public class Banner extends BaseEntity {
    @Id
    private long id;
    private String name;
    private String description;
    private String title;
    private String img;

    @OneToMany
    @JoinColumn(name = "bannerId")
    private List<BannerItem> items;
}
